//-----------------------------------------------------------------------
// <copyright company="Microsoft Corporation">
//     Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Microsoft.DevDiv.Wpf.Samples
{
    using System;
    using System.Windows;
    using System.Windows.Media;
    using System.Windows.Media.Animation;
    using System.Windows.Media.Effects;
    using System.Windows.Threading;

    /// <summary>
    /// Proxy for WPF DrawingContext
    /// </summary>
    /// <remarks>
    /// You cannot inherit from the WPF DrawingContext class.
    /// So I write routines against the DrawingContextProxy (which can be inherited from)
    /// DrawingContextProxy dispatches the calls to its underlying DrawingContext.
    /// </remarks>
    public abstract class DrawingContextProxyBase
    {
        public abstract void Close();
        public abstract void DrawDrawing(Drawing drawing);

        public abstract void DrawEllipse(Brush brush, Pen pen, Point center, AnimationClock centerAnimations, double radiusX, AnimationClock radiusXAnimations, double radiusY, AnimationClock radiusYAnimations);

        public virtual void DrawEllipse(Brush brush, Pen pen, Point center, double radiusX, double radiusY)
        {
            this.DrawEllipse(brush, pen, center, null, radiusX, null, radiusY, null);
        }

        public abstract void DrawGeometry(Brush brush, Pen pen, Geometry geometry);
        public abstract void DrawGlyphRun(Brush foregroundBrush, GlyphRun glyphRun);

        public abstract void DrawImage(ImageSource imageSource, Rect rectangle, AnimationClock rectangleAnimations);

        public virtual void DrawImage(ImageSource imageSource, Rect rectangle)
        {
            this.DrawImage(imageSource, rectangle, null);
        }

        public abstract void DrawLine(Pen pen, Point point0, AnimationClock point0Animations, Point point1, AnimationClock point1Animations);

        public virtual void DrawLine(Pen pen, Point point0, Point point1)
        {
            this.DrawLine(pen, point0, null, point1, null);
        }

        public abstract void DrawRectangle(Brush brush, Pen pen, Rect rectangle, AnimationClock rectangleAnimations);

        public virtual void DrawRectangle(Brush brush, Pen pen, Rect rectangle)
        {
            this.DrawRectangle(brush, pen, rectangle, null);
        }

        public abstract void DrawRoundedRectangle(Brush brush, Pen pen, Rect rectangle, AnimationClock rectangleAnimations, double radiusX, AnimationClock radiusXAnimations, double radiusY, AnimationClock radiusYAnimations);

        public virtual void DrawRoundedRectangle(Brush brush, Pen pen, Rect rectangle, double radiusX, double radiusY)
        {
            this.DrawRoundedRectangle(brush, pen, rectangle, null, radiusX, null, radiusY, null);
        }

        public abstract void DrawVideo(MediaPlayer player, Rect rectangle, AnimationClock rectangleAnimations);

        public virtual void DrawVideo(MediaPlayer player, Rect rectangle)
        {
            this.DrawVideo(player, rectangle, null);
        }

        public abstract void Pop();
        public abstract void PushClip(Geometry clipGeometry);
        public abstract void PushEffect(BitmapEffect effect, BitmapEffectInput effectInput);
        public abstract void PushGuidelineSet(GuidelineSet guidelines);

        public abstract void PushOpacity(double opacity, AnimationClock opacityAnimations);

        public virtual void PushOpacity(double opacity)
        {
            this.PushOpacity(opacity, null);
        }

        public abstract void PushOpacityMask(Brush opacityMask);
        public abstract void PushTransform(Transform transform);
    }
}